for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
const fs = require('fs')
const path = require('path')
const storeMethods = async groups => {
async
/** global: async */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
const keys = Object.keys(groups)
const promises = keys.map(key => new Promise((resolve, reject) => {
fs.writeFile(
path.resolve(__dirname, `../../available/${key}.json`),
JSON.stringify(groups[key], null, 2),
err => {
if (err) {
reject(err)
return
}
resolve({ [key]: true })
})
}))
return Promise.all(promises)
module.exports = { storeMethods }
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.